//
//  QuanzimanageViewCell.m
//  YiqiMobile
//
//  Created by henry on 13-4-17.
//  Copyright (c) 2013年 henry. All rights reserved.
//
#define BUTTONTAG 666
#import "BowenmanageViewCell.h"
#import "Config.h"
#import "Utility.h"

@implementation BowenmanageViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.labelContent=[Utility detailTextLabel:CGRectMake(10, 18, 190, 20) andFontSize:15.0];
        self.labelContent.textColor=[UIColor blackColor];
        [self addSubview:self.labelContent];
        
        self.labelDetail=[Utility detailTextLabel:CGRectMake(10, 45, 300, 15) andFontSize:9.0];
        self.labelDetail.textColor=[UIColor blackColor];
        [self addSubview:self.labelDetail];
        
        
        self.button1=[Utility customButton:self action:@selector(ButtonOfCellAction:) normalImage:@"qz_publish_normal.png" lightedImage:@"qz_publish_hover.png" frame:CGRectMake(205, 16, 50, 20) title:nil tag:BUTTONTAG];
        [self addSubview:self.button1];
        
        self.button2=[Utility customButton:self action:@selector(ButtonOfCellAction:) normalImage:@"qz_goedit_normal.png" lightedImage:@"qz_goedit_hover.png" frame:CGRectMake(260, 16, 50, 20) title:nil tag:BUTTONTAG+1];
        [self addSubview:self.button2];
        // Initialization code
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void) ButtonOfCellAction:(UIButton*) sender{
    if (self.delegate&&[_delegate respondsToSelector:@selector(buttonOfCellAction:andtag:)]) {
        [_delegate buttonOfCellAction:self.indexPath andtag:sender.tag-BUTTONTAG] ;
    }

}

@end
